/*
  @Project Name: vue-admin
  @Author: luichooy
  @Date: 2017-11-20 14:19
  @Email: luichooy@163.com
  @Idea: WebStorm
*/
@import './variable';
@mixin bg-image($url) {
  background-image: url($url + "@2x.png");

  @media (min-device-pixel-ratio: 3), (-webkit-min-device-pixel-ratio: 3) {
    background-image: url($url + "@3x.png");
  }
}
// 背景图片地址和大小
@mixin bis($url) { 
	background-image: url($url);
	background-repeat: no-repeat;
	background-size: 100% 100%;
}
@mixin borderRadius($radius) {
    -webkit-border-radius: $radius;
    -moz-border-radius: $radius;
    border-radius: $radius;
}
@mixin borderTopLeftRadius($radius) {
    -webkit-border-top-left-radius: $radius;
    border-top-left-radius: $radius;
}
@mixin borderBottomLeftRadius($radius) {
    -webkit-border-bottom-left-radius: $radius;
    border-bottom-left-radius: $radius;
}
@mixin borderTopRightRadius($radius) {
    -webkit-border-top-right-radius: $radius;
    border-top-right-radius: $radius;
}
@mixin borderBottomRightRadius($radius) {
    -webkit-border-bottom-Right-radius: $radius;
    border-bottom-Right-radius: $radius;
}
//定位全屏
@mixin allcover{
	position:absolute;
    right: 0;
    left: 0;
}
//定位全屏
@mixin allheightcover{
	position:absolute;
    right: 0;
    left: 0;
    bottom: 0;
    top: 0;
}
//定位上下居中，左右变量
@mixin self($right) {
    position: absolute;
    top: 50%;
    right: $right;
    transform: translateY(-50%);
}
//定位上下左右居中
@mixin center {  
	position: absolute;
	top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

//定位上下居中
@mixin ct {  
	position: absolute;
	top: 50%;
    transform: translateY(-50%);
}

//定位左右居中
@mixin cl {  
	position: absolute;
	left: 50%;
    transform: translateX(-50%);
}

//宽高
@mixin wh($width, $height){
	width: $width;
	height: $height;
}

//字体大小、行高、字体
@mixin font($size, $line-height, $family: 'Microsoft YaHei') {  
	font: #{$size}/#{$line-height} $family;
}

//字体大小，颜色
@mixin sc($size, $color){
	font-size: $size;
	color: $color;
}

//flex 布局和 子元素 对其方式
@mixin fx($type: space-between){
	display: flex;
	justify-content: $type;
	align-items: center;
}

